    <div class="drag" style="position: fixed;left: 0;bottom: 0;top:0;z-index:1000;margin-top:2px;margin: 32px 0px 0px 0px;border-right: 1px solid #ddd; width: 30px; min-height: 100%;background-color: #fff;">
        <?php
        $auth = Auth::getAuth('current_user');
        $db = new Database();
        $user_id = $auth['id'];
        $company_id =  $auth['company_id'];
        $user_group = $auth['role'];
        $user_groupType = $auth['role_type'];
        $position_id = $auth['position_id'];
        $userAvatarMessage = $db->query("SELECT * FROM tbuser WHERE online='1' and id!='$user_id' and company_id ='$company_id'","array");
        foreach($userAvatarMessage as $imageData){
            $name = $imageData['firstname'].'-'.$imageData['lastname'];
            echo "<a href=\"javascript:void(0)\" onclick=\"javascript:chatWith('".$imageData['firstname']."')\">";
            //echo "<a class='openChat'>";
        echo myAvatar($imageData['extension'],$imageData['id'],"30","30","border:1px solid #ddd;");
            echo "</a>";
            //echo '</a>';
        }
        ?>
    </div>
    <div class="body_contents">
        <!--div class="pull-left" style="width: 19%;">
            <div class="sideBar_menu">
                <ul>
                    <a href="/formalistic">
                        <li>
                           <img src="/images/icon/menu_arrow.png"/>
                           Welcome Portal
                        </li>
                    </a>
                    <a href="/formalistic/form_usage">
                        <li>
                           <img src="/images/icon/menu_arrow.png"/>
                           Form Usage
                        </li>
                    </a>
                </ul>
            </div>
        </div-->
    <ul class="tabs"> 
        <li class="active tabSetting" rel="tab1">Create Request</li>
        <li class="tabSetting" rel="tab2">Request to Approve</li>
        <li class="tabSetting" rel="tab3">My Request</li>
        <li class="tabSetting" rel="tab4">History of Approvals</li>
    </ul>    
   <div class="tab_container"> 
        <div id="tab1" class="tab_content">
            <div style="float: left;width: 30%;">
                <!-- Form Title -->
                <div class="titleBar">
                    <div class="left">
                       <div class="titlePosition">
                            Form Titles
                       </div>
                    </div>
                    <div class="right align_right">
                    </div>
                 </div>
                <div class="Holdercontent MyRequestBox">
                    <div class="top">
                        <div style="padding: 10px;margin:0px 0px 0px 10px;">
                            <?php
                                $num = 1;
                                $numrows = $db->query("select DISTINCT(f.id),f.form_title as form_title from tbform_user fu LEFT JOIN tbform f on fu.form_id=f.id WHERE f.company_id='$company_id' and f.is_active=1 and (fu.user = '$user_id' or fu.user='$user_group' or fu.user='pos_$position_id' or fu.user='allUsers') and fu.is_active=1","numrows");
                                if($numrows>0){
                                    $query_forms = $db->query("select DISTINCT(f.id),f.form_title as form_title from tbform_user fu LEFT JOIN tbform f on fu.form_id=f.id WHERE f.company_id='$company_id' and f.is_active=1 and (fu.user = '$user_id' or fu.user='$user_group' or fu.user='pos_$position_id' or fu.user='allUsers') and fu.is_active=1","array");
                                    ?>
                                    <ul>
                                        <?php
                                        foreach($query_forms as $row_forms){
                                            ?>
                                            <li style="cursor: pointer;" class="formGettitle" id="formGettitle<?php echo $row_forms['id']; ?>">
                                                <?php echo $row_forms['form_title']; ?>
                                            </li>
                                            <?php
                                            $num++;
                                        }
                                        ?>
                                    </ul>
                                <?php
                                }else{
                                    echo "No Forms Found";
                                }
                            ?>
                        </div>
                    </div>
                    <div class="down">
                       
                    </div>
                </div>
            </div>
            <div style="float: left;width: 68.5%;margin-bottom: 10px;margin-left: 10px;">
                <div class="titleBar">
                    <div class="left">
                       <div class="titlePosition">
                            Form View
                       </div>
                    </div>
                    <div class="right align_right">
                    </div>
                 </div>
                <div class="Holdercontent MyRequestBox">
                    <div class="top formView">
                    
                    </div>
                </div>
                
            </div>
        </div>
        <div id="tab2" class="tab_content">
            <!-- Request to Approve -->
            <div class="titleBar">
                <div class="left">
                   <div class="titlePosition">
                        <div style="float: right;margin-top: -3px;"><!--img src="/images/icon/minus.png" class="pull-left plusBox activeSearch cursor" id="accordion1" data-dropping="accordion1" data-location-default="RequestApprove" data-location = "tblRequestToApprove" data-table = "requestToApprove_tbl" class="input-small pull-right searchRA" id="search_RequestToApprove" data-search-action="search_request"--></div>
                        <div style="float: left;margin-top: 2px;">Request to Approve</div>
                   </div>
                </div>
                <div class="right align_right">
                </div>
             </div>
            <div class="Holdercontent accordion1">
                <div class="top">
                    <div id="requestToApprove_tbl"></div>
                </div>
                <div class="down">
                   
                </div>
            </div>
        </div>
        <div id="tab3" class="tab_content">
            <!-- Pending Actions -->
            <div class="titleBar">
                <div class="left">
                   <div class="titlePosition">
                        <div style="float: right;margin-top: -3px;"><img src="/images/icon/minus.png" class="pull-left plusBox cursor" id="accordion2" data-dropping="accordion2" data-location-default="PendingRequest" data-location = "tblPendingAction" data-table = "pending_action_tbl" class="input-small pull-right searchRA" id="search_RequestToApprove" data-search-action="search_request"></div>
                        <div style="float: left;margin-top: 2px;">Pending Requests</div>
                   </div>
                </div>
                <div class="right align_right">
                </div>
             </div>
            <div class="Holdercontent accordion2">
                <div class="top">
                   <div id="pending_action_tbl"></div>
                </div>
                <div class="down">
                   
                </div>
            </div>
            <!-- My Request -->
            <div class="titleBar">
                <div class="left">
                   <div class="titlePosition">
                        <div style="float: right;margin-top: -3px;"><img src="/images/icon/plus.png" class="pull-left plusBox cursor" id="accordion3" data-dropping="accordion3" data-location-default="MyRequest" data-location = "tblMyRequest" data-table = "myRequest_tbl" class="input-small pull-right searchRA" id="search_requestApprove" data-search-action="search_request" ></div>
                        <div style="float: left;margin-top: 2px;">My Request</div>
                   </div>
                </div>
                <div class="right align_right">
                </div>
             </div>
            <div class="Holdercontent accordion3 display">
                <div class="top">
                    <div id="myRequest_tbl"></div>
                </div>
                <div class="down">
                   
                </div>
            </div>
            <!-- Drop Table Request -->
            <div class="titleBar">
                <div class="left">
                   <div class="titlePosition">
                        <div style="float: right;margin-top: -3px;"><img src="/images/icon/plus.png" class="pull-left plusBox cursor" id="accordion5" data-dropping="accordion5" data-location-default="drop" data-location = "tbldrop" data-table = "dropTable_tbl" class="input-small pull-right searchRA" id="search_requestApprove" data-search-action="search_request" ></div>
                        <div style="float: left;margin-top: 2px;">Draft Request</div>
                   </div>
                </div>
                <div class="right align_right">
                </div>
             </div>
            <div class="Holdercontent accordion5 display">
                <div class="top">
                    <div id="dropTable_tbl"></div>
                </div>
                <div class="down">
                   
                </div>
            </div>
        </div>
        <div id="tab4" class="tab_content">
            <!-- History of Approved Request-->
            <div class="titleBar">
                <div class="left">
                   <div class="titlePosition">
                        <div style="float: right;margin-top: -3px;"><!--img src="/images/icon/plus.png" class="pull-left plusBox cursor" id="accordion4" data-dropping="accordion4" data-location-default="HistoryApproved" data-location = "tblHistoryRequest" data-table = "historyApprovedRequest_tbl" class="input-small pull-right searchRA" id="search_requestApprove" data-search-action="search_request" --></div>
                        <div style="float: left;margin-top: 2px;">History of Approvals</div>
                   </div>
                </div>
                <div class="right align_right">
                </div>
             </div>
            <div class="Holdercontent accordion4">
                <div class="top">
                    <div id="historyApprovedRequest_tbl"></div>
                </div>
                <div class="down">
                   
                </div>
            </div>
        </div>
    </div>
    </div>
    <div class="loadRequest" style="display: none"></div>
    <script>
        setActivNav("request");
    </script>